package demo.using.jsonObject;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

/**
 * @author : GuoFei
 * @date : 2019/2/26 15:28
 */
public class MyJSONTest {
    public static void main(String[] args) {
        JSONObject jo = new JSONObject();
        jo.put("label", new JSONArray());
        jo.computeIfAbsent("summary", k -> new JSONObject());
        jo.computeIfAbsent("label", k -> new JSONObject());
        // console:   {"summary":{},"label":[]}
        System.out.println(jo.toJSONString());
    }
}
